<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台欢迎页</title>
    <link rel="stylesheet" href="/static/css/reset.css" />
    <link rel="stylesheet" href="/static/css/content.css" />
</head>
<body marginwidth="0" marginheight="0">
<div class="container">
    <!--    <div class="public-nav">您当前的位置：<a href="{:url('admin/index/index')}">管理首页</a>><a href="">背景音乐管理</a></div>-->
    <div class="public-content">
        <div class="public-content-header">
            <h3>广告管理</h3>
        </div>
        <div class="public-content-cont">
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/advert/index?area=2')}">视频广告</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/advert/index?area=1')}">图片广告</a>
            <table class="public-cont-table">
                <tr>
                    <th style="width:10%">ID</th>
                    <th style="width:10%">图片/视频</th>
                    <th style="width:20%">名称</th>
                    <th style="width:20%">排序</th>
                    <th style="width:20%">添加时间</th>
                    <th style="width:20%">操作</th>
                </tr>
                {foreach $list as $key=>$vo}
                <tr>
                    <td>{$vo.id}</td>
                    <td>{if substr($vo['url'],-3) == 'mp4'}

                        {else /}
                        <img src="{$vo.url}" width=80 height=80 ></td>
                    {/if}
                    <td>{$vo.name}</td>
                    <td>{$vo.row}</td>
                    <td>{$vo.time|date='Y-m-d H:i:s'}</td>
                    <td>
                        <div class="table-fun">
                            <a href="{:url('admin/advert/advertup',array('id'=>$vo['id']))}">修改</a>
<!--                            <a href="">删除</a>-->
                        </div>
                    </td>
                </tr>
                {/foreach}
            </table>
        </div>
    </div>
</div>
</body>
</html>